#define _CRT_SECURE_NO_WARNINGS 1
#include"SeqList.h"

void TestSeqListBuck()
{
	SL s;
	SeqListInit(&s);
	SeqListPushBack(&s, 1);
	SeqListPushBack(&s, 2);
	SeqListPushBack(&s, 3);
	SeqListPushBack(&s, 4);
	SeqListPushBack(&s, 5);
	SeqListPushBack(&s, 6);
	SeqListPrint(&s);

	SeqListInsert(&s, 0, 9);
	SeqListPrint(&s);

	SeqListEarse(&s, 1);
	SeqListPrint(&s);

}

int removeElement(int* num, int numsize, int val)
{
	int* num1 = num;
	int count = 0;
	while (numsize--)
	{
		if (*num == val)
		{
			num++;
		}
		else
		{
			count++;
			*num1 = *num;
			num1++;
			num++;
		}
	}
	return count;

}
int main()
{
	int arr[] = { 2,3,4,5,3,4 };
	int ret = removeElement(arr, 6, 3);
	int i = 0;
	for (i = 0; i < ret; i++)
	{
		printf("%d ",arr[i]);
	}
	return 0;
}



